package com.mjfeed.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.mjfeed.activity.MainActivity;
import com.mjfeed.activity.R;
/**
 * 技术服务Fragment
 * @author zhaominglei
 * @date 2014-12-6
 * 
 */
public class ServiceFragment extends BaseFragment implements OnClickListener{
	@SuppressWarnings("unused")
	private static final String TAG = ServiceFragment.class.getSimpleName();
	private View view;
	private MainActivity activity;
	
	private ImageView goHome;
	
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.fragment_service, container, false);
		return view;
	}

	@Override
	public void onActivityCreated(@Nullable Bundle savedInstanceState) {
		view = getView();
		activity = (MainActivity)getActivity();
		super.onActivityCreated(savedInstanceState);
		
		init();
	}
	
	private void init() {
		goHome = (ImageView) view.findViewById(R.id.service_gohome);
		goHome.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.service_gohome:
			activity.setFragmentIndicator(0);
			break;

		default:
			break;
		}
	}
}
